//
//  MoreViewCell.m
//  GolfFriend
//
//  Created by Vescky on 14-2-9.
//  Copyright (c) 2014年 vescky.org. All rights reserved.
//

#import "MoreViewCell.h"

@interface MoreViewCell ()

@end

@implementation MoreViewCell

- (void)setDataInfo:(NSDictionary*)_dict {
    [iconView setImage:[UIImage imageNamed:[_dict objectForKey:@"icon"]]];
    [labelTitle setText:[_dict objectForKey:@"cn_name"]];
    [labelTitleEn setText:[_dict objectForKey:@"en_name"]];
    
    CGSize cnSize = [[_dict objectForKey:@"cn_name"] sizeWithFont:[UIFont systemFontOfSize:19] constrainedToSize:CGSizeMake(300,labelTitle.frame.size.height) lineBreakMode:0];
    CGSize enSize = [[_dict objectForKey:@"en_name"] sizeWithFont:[UIFont systemFontOfSize:12] constrainedToSize:CGSizeMake(300,labelTitleEn.frame.size.height) lineBreakMode:0];
    
    CGRect cnTitleRect = labelTitle.frame;
    CGRect enTitleRect = labelTitleEn.frame;
    
    cnTitleRect.size.width = cnSize.width + 10;
    enTitleRect.origin.x = cnTitleRect.origin.x + cnTitleRect.size.width;
    enTitleRect.size.width = enSize.width + 10;
    
    [labelTitle setFrame:cnTitleRect];
    [labelTitleEn setFrame:enTitleRect];
}

@end
